function onlineTimeCount() {
    $.get('/admin/visual/onlinetime_month_info').done(function (data) {
        var myChart = echarts.init(document.getElementById('online_time_count'), 'macarons');
        myChart.setOption({
            title: {
                text: '过去30天在线总时长',
                subtext: data.time_start + ' ~ ' + data.time_end,
            },
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b} : {c} ({d}%)"
            },
            legend: {
                x: 'center',
                y: 'bottom',
                data: ['会员', '游客']
            },
//            toolbox: {
//                show: true,
//                feature: {
//                    mark: {show: true},
//                    dataView: {show: true, readOnly: false},
//                    magicType: {
//                        show: true,
//                        type: ['pie', 'funnel']
//                    },
//                    restore: {show: true},
//                    saveAsImage: {show: true}
//                }
//            },
            calculable: true,
            series: [
                {
                    name: '在线总时长',
                    type: 'pie',
                    radius : '55%', //大小
                    center: ['50%', '60%'],
//                    roseType: 'radius',
                    data: [
                        {value: data.count_user, name: '会员'},
                        {value: data.count_guest, name: '游客'},
                    ]
                }
            ]
        });
        window.onresize = myChart.resize;
    });
}




